﻿using System.Windows.Media;

namespace Gmantis.Controls.Extended
{
    public class ColorPaletteEntry
    {
        // Fields
        private Color _color;
        private string _colorName;
        private string _description;

        // Methods
        internal ColorPaletteEntry(Color color)
        {
            this._color = color;
            this._colorName = this._color.ToString();
            this._description = string.Empty;
        }

        internal ColorPaletteEntry(Color color, string colorName)
            : this(color, colorName, string.Empty)
        {
        }

        internal ColorPaletteEntry(Color color, string colorName, string description)
        {
            this._color = color;
            this._colorName = colorName;
            this._description = description;
        }

        public void SetColor(Color color)
        {
            this._color = color;
            this._colorName = this._color.ToString();
        }

        public void SetColor(Color color, string colorName)
        {
            this._color = color;
            this._colorName = colorName;
        }

        // Properties
        public Color Color
        {
            get
            {
                return this._color;
            }
        }

        public string ColorName
        {
            get
            {
                return this._colorName;
            }
        }

        public string Description
        {
            get
            {
                return this._description;
            }
            set
            {
                this._description = value;
            }
        }
    }
}
